This invention relates to processor systems that support multiple concurrently operational applications and, in particular, to a system for simplifying the procedures used to maintain the integrity of data that is stored in a database without adversely effecting data access speed.
It is a problem in database systems to maintain the integrity of data that is stored in the database system and accessible by a plurality of concurrently operational processes. The speed of access to data that is stored in a database is critical for the efficient operation of a processor. The data must be retrieved and updated as quickly as possible while also maintaining the integrity of the data that is stored in the database for use by a number of concurrently operational applications. The database system therefore typically includes control software that manages a set of data integrity constraints defined by the data population rules. The database system must ensure that the transactions that populate and/or modify the data that is stored in the database system do not violate these data population rules and negatively impact the integrity of the data that is stored in the database system.
The classic way of handling data integrity uses triggers in the database system. Every time the database system recognizes that a received request results in a change in a selected database object, the database system triggers a routine which implements constraint checking for the selected database object. If the constraints defined for the selected database object are not violated, then the database system updates the selected database object. This process is simple but cannot easily handle complex constraint rules. The database also must implement the triggers, as defined by the database programmers, for every database object that is stored in the database for every data access, which slows the speed of operation of the database. Alternatively, the database system integrity maintenance logic can be programmed into the data constructor member function and the data destructor member function that operate to implement the data changes. This eliminates the need for database implemented triggers but it is difficult to handle complex inter-object rules, such as relationship constraints, using this architecture. In addition, changes to data members of classes must be made only via the specifically named data access function.
A further problem is that it is desirable to use an object oriented database system programming language, which enables program updates in an efficient manner. However, there is a mismatch between object oriented programming languages and the traditional methodologies used in relational database technology to ensure data integrity. The object oriented database technology does not adequately support data integrity processes that can address the complex data interactions and constraints. Existing object oriented database systems do not provide any tools that directly address integrity enforcement for complex constraints. The available tools are directed to only simple database relationships. Custom software can be developed to overcome this problem, using object oriented query languages or database programming languages, but such a solution is vendor specific, not widely supported and, since it is custom software, would be expensive to develop and maintain as changes occur in the underlying database programming language.
The above described problems are solved and a technical advance achieved by the present system for maintaining the integrity of application data, which functions to provide a mechanism to generate safe and efficient database transactions. This is accomplished by minimizing the number of constraints applied to the data stored in the database by segmenting the database into two portions: a set of base data objects and a set of view data objects. The base data objects comprise a set of data that is normalized to reduce the need for complex integrity checks. The set of view data objects represents views of the base data objects as presented in a form needed by the various applications extant in the processor. The system for maintaining the integrity of application data enables the applications to access both the view data objects the base data objects, but to effect a change in the data contained therein, access via an integrity checking process is only provided to the base data objects. The system for maintaining the integrity of application data updates the base data objects using integrity checks, which updates are then propagated to the view data objects to maintain the currency and consistency of these view data objects. The definitions of the various views are architected to capture the semantics of the derived data so there is no need for integrity constraints in the view data objects. Therefore, whatever integrity constraints are necessary are imposed only on the normalized base data objects when modifications to the data stored therein are requested, thereby minimizing the complexity of updates.